package com.xiaochi.auth.common.enums;

import lombok.Getter;

/**
 * @author zqx
 * @since 2024/7/21
 * 用户状态枚举类
 */
@Getter
public enum AuthUserStatusEnum {

    CLOSE(1,"禁用"),
    OPEN(0,"启用");


    private int code;
    private String message;

    AuthUserStatusEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public static AuthUserStatusEnum getResultCodeEnum(int code) {
        for (AuthUserStatusEnum resultCodeEnum : AuthUserStatusEnum.values()) {
            if (resultCodeEnum.getCode() == code) {
                return resultCodeEnum;
            }
        }
        return null;
    }
}
